{include file="public/header" /}
<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5>审核</h5>
                    <div class="ibox-tools">
                        <a class="collapse-link">
                            <i class="fa fa-chevron-up"></i>
                        </a>
                    </div>
                </div>
                <div class="ibox-content">
                    <form class="form-horizontal" name="userAdd" id="userAdd">
                        <input type="hidden" name="in_id" value="{$info.in_id}">
                        <div class="form-group">
                            <label class="col-sm-3 control-label">标题：</label>
                            <div class="input-group col-sm-4">
                                <input id="in_name" type="text" class="form-control" name="in_name"
                                       value="{$info.in_name}" disabled>
                            </div>
                        </div>
                        <div class="hr-line-dashed"></div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">缩略图：</label>
                            <div class="input-group col-sm-5">
                                <img id="img_data" height="100px"
                                     style="float:left;margin-left: 50px;margin-top: -10px;cursor:pointer;"
                                     src="{$info.in_img}" onclick='imgDisplay(this)'
                                     onerror="this.src='/static/admin/images/head_default.gif'" class="img-circle"/>
                            </div>
                        </div>
                        <div class="hr-line-dashed"></div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">编号：</label>
                            <div class="input-group col-sm-4">
                                <input id="in_num" type="text" class="form-control" name="in_num" value="{$info.in_num}"
                                       disabled>
                            </div>
                        </div>
                        <div class="hr-line-dashed"></div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">仓库：</label>
                            <div class="input-group col-sm-4">
                                <input id="warehouse_name" type="text" class="form-control" name="warehouse_name"
                                       value="{$info.warehouse_name}" disabled>
                            </div>
                        </div>
                        <div class="hr-line-dashed"></div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">规格类型：</label>
                            <div class="input-group col-sm-4">
                                <input id="spec_type" type="text" class="form-control" name="spec_type"
                                       value="{$info.spec_type}" disabled>
                            </div>
                        </div>
                        <div class="hr-line-dashed"></div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">房屋类型：</label>
                            <div class="input-group col-sm-4">
                                <input id="house_type" type="text" class="form-control" name="house_type"
                                       value="{$info.house_type}" disabled>
                            </div>
                        </div>
                        <div class="hr-line-dashed"></div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">经办人：</label>
                            <div class="input-group col-sm-4">
                                <input id="user_username" type="text" class="form-control" name="user_username"
                                       value="{$info.user_username}" disabled>
                            </div>
                        </div>
                        <div class="hr-line-dashed"></div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">入库时间：</label>
                            <div class="input-group col-sm-4">
                                <input id="create_time" type="text" class="form-control" name="create_time"
                                       value="{$info.create_time}" disabled>
                            </div>
                        </div>
                        <div class="hr-line-dashed"></div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">地址：</label>
                            <div class="input-group col-sm-4">
                                <input id="in_address" type="text" class="form-control" name="in_address"
                                       value="{$info.in_address}" disabled>
                            </div>
                        </div>
                        <div class="hr-line-dashed"></div>
                        <div class="form-group">
                            <div class="form-group">
                                <label class="col-sm-3 control-label cyanse" for="myEditor">摘要：</label>
                                <!--for="myEditor"-->
                                <div class="input-group col-sm-9">
                                    <textarea name="content" style="width:44%"
                                              id="myEditor">{$info.in_abstract}</textarea>
                                </div>
                            </div>
                        </div>

                        <div class="hr-line-dashed"></div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">审核结果：</label>
                            <div class="layui-input-block">
                                <label><input type="radio" name="in_status" value="2" checked>通过&nbsp;</label>
                                <label><input type="radio" name="in_status" value="3">驳回</label>
                            </div>
                        </div>

                        <div class="hr-line-dashed"></div>
                        <div class="form-group">
                            <div class="col-sm-4 col-sm-offset-3">
                                <button class="btn btn-primary btsave" type="button" id="audit"><i class="fa fa-save"></i> 审核
                                </button>
                                &nbsp;&nbsp;&nbsp;
                                <a class="btn btn-danger" href="javascript:history.go(-1);"><i class="fa fa-close"></i>
                                    返回</a>
                            </div>
                        </div>
                    </form>
                </div>
            </div>

        </div>
    </div>
</div>
{include file="public/footer" /}

<script type="text/javascript" src="__JS__/Crop.js"></script>
<script type="text/javascript" src="__JS__/jquery.min.js"></script>
<script type="text/javascript">

    $("#audit").click(function(){
//                $('button').attr('disabled', 'disabled');
        $.ajax({
            url: "{:url('Warehouse/audit')}",
            type: "post",
            dataType: "json",
            data: $("#userAdd").serialize(),
            success: function (data) {
                if (data.code == 200) {
                    wk.success(data.msg, "{:url('Warehouse/index')}")
                } else {
                    $('button').removeAttr('disabled');
                    wk.error(data.msg, '', '$(".layui-btn").removeClass(\'layui-disabled\').removeAttr(\'disabled\');');
                    return false;
                }
            }
        });
    })
</script>
</body>
</html>